The point of GdkWindowImpl::get_root_coords is to translate the passed
in coordinates against the passed-in impl window. For a child window,
in fact, window->abs_x and window->abs_y already track the child
window's coordinates against the impl window.
If we pass in a child window, and backends don't explicitly get the impl
window from it, we'll double-count the child window.
Really, we should *always* be passing impl windows to backends, and
never child windows. However, I'm a bit worried for regressions late
in the cycle if we want to fix up the rest of the callers, like
gdk_window_get_geometry, so I'm only going to touch get_root_coords
for now after careful review of all the backends.
}
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
- impl_class->get_root_coords (window,
+ impl_class->get_root_coords (window->impl_window,
window->abs_x,
window->abs_y,
x, y);
}
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
- impl_class->get_root_coords (window,
+ impl_class->get_root_coords (window->impl_window,
x + window->abs_x,
y + window->abs_y,
root_x, root_y);